<!--
Date: 2025-08-13
Copyright (c) 2025 CAX Conversion Project
-->
<template>
  <el-dialog v-model="dialogVisible" title="参数设置" width="800" :before-close="closeDialog">
    <el-form :model="parameterSettingFormData" label-position="top">
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="标题/说明">
            <el-checkbox v-model="parameterSettingFormData.checkbox1" label="标题/说明描述" />
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="部件定义">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox2">
              <el-checkbox label="实体" value="A" />
              <el-checkbox label="表面" value="B" />
              <el-checkbox label="属性" value="C" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="装配">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox3">
              <el-checkbox label="位置" value="A" />
              <el-checkbox label="方向" value="B" />
              <el-checkbox label="连接关系" value="C" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="节点与元素">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox4">
              <el-checkbox label="节点坐标" value="A" />
              <el-checkbox label="有限元元素及关联节点" value="B" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="边界条件">
            <el-checkbox v-model="parameterSettingFormData.checkbox5" label="自由度" />
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="接触定义">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox6">
              <el-checkbox label="接触类型及参数" value="A" />
              <el-checkbox label="碰撞类型及参数" value="B" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="材料属性">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox7">
              <el-checkbox label="物理性质" value="A" />
              <el-checkbox label="力学性质" value="B" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="步骤定义">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox8">
              <el-checkbox label="加载步骤" value="A" />
              <el-checkbox label="时间积分方案" value="B" />
              <el-checkbox label="分析类型" value="C" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="输出请求">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox9">
              <el-checkbox label="结果类型" value="A" />
              <el-checkbox label="频率" value="B" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="后处理指示">
            <el-checkbox v-model="parameterSettingFormData.checkbox10" label="注释或指示" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>

    <template #footer>
      <div class="dialog-footer text-center">
        <el-button @click="closeDialog">取消</el-button>
        <el-button type="primary" @click="closeDialog">保存</el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script setup name="ParameterSettingDialog" lang="ts">
const dialogVisible = ref(false);
const parameterSettingFormData = ref({
  checkbox1: true,
  checkbox2: ['A', 'B', 'C'],
  checkbox3: ['A', 'B', 'C'],
  checkbox4: ['A', 'B'],
  checkbox5: true,
  checkbox6: ['A', 'B'],
  checkbox7: ['A', 'B'],
  checkbox8: ['A', 'B', 'C'],
  checkbox9: ['A', 'B'],
  checkbox10: true
});
const openDialog = () => {
  dialogVisible.value = true;
};
const closeDialog = () => {
  dialogVisible.value = false;
};
defineExpose({
  openDialog,
  closeDialog
});
</script>
<style lang="scss" scoped>
:deep(.el-form-item__label) {
  color: #409eff;
}
:deep(.el-form-item__label)::before {
  content: '';
  display: inline-block;
  width: 2px;
  height: 15px;
  margin-right: 6px;
  background-color: #409eff;
}
</style>
